import { defineConfig } from 'vite'
import Components from 'unplugin-vue-components/vite'
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
import vue from '@vitejs/plugin-vue'
import path from 'path' // 引入 path 模块

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue(), Components({
    resolvers: [AntDesignVueResolver({
      importStyle: false,
    })],
  })],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src') // 配置别名 @ 指向 src 目录
    }
  },
})
